<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="css/search_style.css">
<title>Portal for kids</title>
</head>
<body background="images/bg_search.jpg">
<div id="top">
 <ul id=menu>
      <li><a href="index.jsp">home</a></li>
      <li><a href=#>aktualności</a></li>
      <li><a href=#>projekt</a></li>
      <li><a href=#>oceny</a></li>
      <li><a href=#>o nas</a></li>
      <li><a href=#>kontakt</a></li>
    </ul>
</div>

<div id=bottom>

	<% 
		if(request.getAttribute("peoplesList") == null){%>
		<h2 style="color: white">Wybierz typ</h2>
			<form action="searchPeople" method="post">
			 <select name="type" > 
			  <option>wybierz</option> 
			  <option>Korepetytorzy</option> 
			  <option>Lekarze</option> 
			  <option>Pedagodzy</option> 
			  <option>Logopedzi</option> 
			  <option>Opiekunki do dzieci</option> 
			</select>  <br /><br />
			<input type="submit" value="Wyszukaj" />
</form>	
<%}else{ %>		
<div>
	<table width=800px  style="text-align: center; font-size: 15px; background-color: #f6d463;" cellpadding="4" border="1" >
			<tr>
				<th>Typ</th>
				<th>Imie</th>
				<th>Nazwisko</th>
				<th>Telefon</th>
				<th>Mail</th>
				<th>Adres</th>
				<th>Wiecej Informacji</th>
			</tr>
				<s:iterator value="peoplesList" >
					<tr>
						<td ><s:property value="type"/>
						<td><s:property value="firstname"/></td>
						<td><s:property value="surname"/></td>
						<td ><s:property value="phone"/></td>
						<td ><s:property value="mail"/></td>
						<td ><s:property value="adress"/></td>
						<td ><a href="peopleDetails.jsp?id=<s:property value="id_people"/>">szczegóły</a></td>
					</tr>	
				</s:iterator>
			</table>
</div>
<%} %>
</div>
</body>
</html>